package org.puppet.demo.tank.bullets;

import org.puppet.demo.tank.R;
import org.puppet.demo.tank.explode.DualExplode;
import org.puppet.demo.tank.puppet.Bullet;
import org.puppet.demo.tank.puppet.Tank;
import org.puppet.game.base.PuppetUtils;
import org.puppet.game.element.PuppetInfo;
import org.puppet.game.element.PuppetInfo.AnimInfo;

import android.content.Resources;

public class DualBullet extends Bullet {

	public DualBullet(Tank tank) {
		super(tank);		
		//TODO config
		this.explode = new DualExplode(this);
		this.acceY = -0.0028f;
	}

	@Override
	protected PuppetInfo getAnimationInfo(Resources res) {
		PuppetInfo info = new PuppetInfo();
		info.setBitmap(PuppetUtils.createBitmap(res, R.drawable.bullet));
		info.setFrameHeight(32);
		info.setFrameWidth(32);
		
		AnimInfo[] ais = new AnimInfo[9];
		for (int i = 0; i < ais.length; i++) {
			ais[i] = new AnimInfo(i, new long[]{1000}, 16, 16);
		}
		
		info.setAnims(ais);
		
		return info;
	}
	
}
